package com.bed.lovewithpatientbed.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * hospital_manager
 * @author 
 */
public class HospitalManager implements Serializable {
    private Integer hospitalManagerId;

    private Integer deptManagerId;

    private String hospitalManagerName;

    private String hospitalManagerPhone;

    private Integer workerMessageId;

    private Integer dealerId;

    @JsonFormat(pattern = "yyyy-MM-dd" )
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date hospitalManagerDate;

    private Integer softdel;

    private WorkerMessage workerMessage;

    private Role role;

    private Dealer dealer;

    private Hospital hospital;

    public Dealer getDealer() {
        return dealer;
    }

    public void setDealer(Dealer dealer) {
        this.dealer = dealer;
    }

    public Hospital getHospital() {
        return hospital;
    }

    public void setHospital(Hospital hospital) {
        this.hospital = hospital;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public WorkerMessage getWorkerMessage() {
        return workerMessage;
    }

    public void setWorkerMessage(WorkerMessage workerMessage) {
        this.workerMessage = workerMessage;
    }

    private static final long serialVersionUID = 1L;

    public Integer getHospitalManagerId() {
        return hospitalManagerId;
    }

    public void setHospitalManagerId(Integer hospitalManagerId) {
        this.hospitalManagerId = hospitalManagerId;
    }

    public Integer getDeptManagerId() {
        return deptManagerId;
    }

    public void setDeptManagerId(Integer deptManagerId) {
        this.deptManagerId = deptManagerId;
    }

    public String getHospitalManagerName() {
        return hospitalManagerName;
    }

    public void setHospitalManagerName(String hospitalManagerName) {
        this.hospitalManagerName = hospitalManagerName;
    }

    public String getHospitalManagerPhone() {
        return hospitalManagerPhone;
    }

    public void setHospitalManagerPhone(String hospitalManagerPhone) {
        this.hospitalManagerPhone = hospitalManagerPhone;
    }

    public Integer getWorkerMessageId() {
        return workerMessageId;
    }

    public void setWorkerMessageId(Integer workerMessageId) {
        this.workerMessageId = workerMessageId;
    }

    public Integer getDealerId() {
        return dealerId;
    }

    public void setDealerId(Integer dealerId) {
        this.dealerId = dealerId;
    }

    public Date getHospitalManagerDate() {
        return hospitalManagerDate;
    }

    public void setHospitalManagerDate(Date hospitalManagerDate) {
        this.hospitalManagerDate = hospitalManagerDate;
    }

    public Integer getSoftdel() {
        return softdel;
    }

    public void setSoftdel(Integer softdel) {
        this.softdel = softdel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalManager other = (HospitalManager) that;
        return (this.getHospitalManagerId() == null ? other.getHospitalManagerId() == null : this.getHospitalManagerId().equals(other.getHospitalManagerId()))
            && (this.getDeptManagerId() == null ? other.getDeptManagerId() == null : this.getDeptManagerId().equals(other.getDeptManagerId()))
            && (this.getHospitalManagerName() == null ? other.getHospitalManagerName() == null : this.getHospitalManagerName().equals(other.getHospitalManagerName()))
            && (this.getHospitalManagerPhone() == null ? other.getHospitalManagerPhone() == null : this.getHospitalManagerPhone().equals(other.getHospitalManagerPhone()))
            && (this.getWorkerMessageId() == null ? other.getWorkerMessageId() == null : this.getWorkerMessageId().equals(other.getWorkerMessageId()))
            && (this.getDealerId() == null ? other.getDealerId() == null : this.getDealerId().equals(other.getDealerId()))
            && (this.getHospitalManagerDate() == null ? other.getHospitalManagerDate() == null : this.getHospitalManagerDate().equals(other.getHospitalManagerDate()))
            && (this.getSoftdel() == null ? other.getSoftdel() == null : this.getSoftdel().equals(other.getSoftdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getHospitalManagerId() == null) ? 0 : getHospitalManagerId().hashCode());
        result = prime * result + ((getDeptManagerId() == null) ? 0 : getDeptManagerId().hashCode());
        result = prime * result + ((getHospitalManagerName() == null) ? 0 : getHospitalManagerName().hashCode());
        result = prime * result + ((getHospitalManagerPhone() == null) ? 0 : getHospitalManagerPhone().hashCode());
        result = prime * result + ((getWorkerMessageId() == null) ? 0 : getWorkerMessageId().hashCode());
        result = prime * result + ((getDealerId() == null) ? 0 : getDealerId().hashCode());
        result = prime * result + ((getHospitalManagerDate() == null) ? 0 : getHospitalManagerDate().hashCode());
        result = prime * result + ((getSoftdel() == null) ? 0 : getSoftdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", hospitalManagerId=").append(hospitalManagerId);
        sb.append(", deptManagerId=").append(deptManagerId);
        sb.append(", hospitalManagerName=").append(hospitalManagerName);
        sb.append(", hospitalManagerPhone=").append(hospitalManagerPhone);
        sb.append(", workerMessageId=").append(workerMessageId);
        sb.append(", dealerId=").append(dealerId);
        sb.append(", hospitalManagerDate=").append(hospitalManagerDate);
        sb.append(", softdel=").append(softdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}